Remove Method

Wintellect PowerCollections

Collapse imageExpand ImageCollapseAll imageExpandAll imageDropDown imageDropDownHover imageCopy imageCopyHover image
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Searches the bag for one item equal to item, and if found, removes it from the bag. If not found, the bag is unchanged.

Namespace: Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax

C#
public bool Remove(
	T item
)
Visual Basic (Declaration)
Public Function Remove ( _
	item As T _
) As Boolean
Visual C++
public:
virtual bool Remove (
	T item
) sealed

Parameters

item
T
The item to remove.

Return Value

True if item was found and removed. False if item was not in the bag.

Remarks

Equality between items is determined by the comparison instance or delegate used to create the bag.

Removing an item from the bag takes approximated constant time, regardless of the number of items in the bag.

See Also